﻿using System;

namespace enyo
{
    [ImportClass("enyo", string.Empty)]
    public class Global
    {
        /// <summary>
        /// Sets the log level for this window if the input is a real number.
        /// The log level is used as a watermark to control the amount of logging.
        /// Setting the log level lower will prevent logging functions with a higher level from being executed.
        /// </summary>
        /// <param name="level"></param>
        public static void SetLogLevel(int level)
        {
        }

        /// <summary>
        /// Sends a log message to the console, if the current log level allows for it.
        /// Objects are converted to JSON automatically.
        /// Multiple arguments are coerced to String and joined with spaces.
        /// </summary>
        /// <param name="args"></param>
        public static void Log(params object[] args)
        {
        }

        /// <summary>
        /// Same as log, except uses the console's warn method (if it exists).
        /// </summary>
        public static void Warn(params object[] args)
        {
        }

        /// <summary>
        /// Same as log, except uses the console's error method (if it exists).
        /// </summary>
        public static void Error(params object[] args)
        {
        }

        /// <summary>
        /// Return appId
        /// </summary>
        /// <returns></returns>
        public static string FetchAppId()
        {
            return null;
        }

        /// <summary>
        /// Gets a named value from the document cookie.
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static string GetCookie(string name)
        {
            return null;
        }

        /// <summary>
        /// Sets a named value into the document cookie, with properties.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="val"></param>
        /// <param name="props">
        /// <para>Properties in the optional props argument are attached to the cookie.
	    /// props may have an expires property, which can be a number of days, a Date object,
	    /// or a UTC time string.
        /// </para>
        /// <para>To remove a cookie, use a props value of { "Max-Age": 0 }.</para>
        /// </param>
        public static void SetCookie(string name, string val, object props)
        {
        }

        /// <summary>
        /// bind a function to a target
        /// </summary>
        /// <param name="target"></param>
        /// <param name="funcName"></param>
        /// <returns></returns>
        public static object Bind(object target, string funcName)
        {
            return null;
        }
    }
}
